/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package beans;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import org.hibernate.validator.constraints.Email;

/**
 *
 * @author Nina
 */
@ManagedBean
@RequestScoped
public class ManagedBeanKontakt {

    private String vorname;
    private String nachname;
    private String email;
    private String text;

    @Email
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getNachname() {
        return nachname;
    }

    public void setNachname(String nachname) {
        this.nachname = nachname;
    }

    public String getVorname() {
        return vorname;
    }

    public void setVorname(String vorname) {
        this.vorname = vorname;
    }

    public String getText() { 
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
    
    public String cancel() {
        //reset();
        return "/faces/index.xhtml";
    }

    public String senden(){
        reset();
        return "/faces/index.xhtml";
    }
    
    public void reset() {
        vorname = "";
        nachname = "";
        email = "";
        text = "";
    }
    
    public ManagedBeanKontakt() {
    }
}
